package com.carpedil.ms.controller;

import com.carpedil.ms.entity.User;
import com.carpedil.ms.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/** @author Administrator */
@RestController
@RequestMapping("user")
public class UserController {
  @Autowired private UserService userService;

  @GetMapping("login")
  public User login(String username, String password) {
    return userService.login(username, password);
  }
}
